1. Field of the Invention
The present invention relates to an apparatus and method for detecting a mode change in an electronic device. More particularly, the present invention relates to an apparatus and method for detecting a mode change depending on an operation of a rotary switch.
2. Description of the Related Art
Today, various electronic devices using rotary switches have been launched. For example, the rotary switches are used in microwave ovens, Digital Multi-Meters (DMM), and cameras.
FIG. 1 illustrates a structure of a rotary switch in the conventional electric device.
Referring to FIG. 1, the rotary switch includes a common port and a plurality of contact points, each contact point corresponding to a plurality of modes. The rotary switch rotates under the control of a user to connect the common port to a specific contact point so that the electronic device may operate in a specific mode corresponding to the specific contact point. In this case, the electronic device may operate in a mode selected by the user by using a controller (i.e., a Micro Control Unit (MCU) or a Central Processing Unit (CPU)) to determine which contact point is connected to the common port.
FIG. 2 illustrates a circuit diagram for determining a mode selected by a rotary switch in a conventional electronic device.
Referring to FIG. 2, the contact points may be connected to a pull-down input port of the MCU. If a voltage is supplied to the common port such that the contact points are all connected to the input port of the MCU, a current flows only to the contact points connected to the common port. Therefore, the contact points connected to the common port may be determined by sequentially determining the input port of the MCU or by applying an interrupt condition to each input port. However, in this method, the number of required input ports of the MCU is equal to the number of the contact points.
FIG. 3 illustrates a circuit diagram for determining a mode selected by a rotary switch in a conventional electronic device.
Referring to FIG. 3, according to another conventional method, the pull-up circuit is constructed in a common port and the pull-down circuit having a different resistance is established via each contact point. Thus, a voltage level of the common port is evaluated by using the Analog to Digital Converter (ADC) to determine a contact point currently connected to the common port. However, this method has a disadvantage in that the voltage level of the common port has to be periodically evaluated by using the ADC since it cannot be known when a switching operation will be performed in a rotary switch. Although the second method of using the ADC has an advantage in that a smaller number of input ports are used in comparison with the method of using the input port and the contact point of the MCU, the second method also has a disadvantage in terms of software tasks and power consumption in an idle state.